/*
 * Copyright 2002-2016 the Beijing Brain Technology co.,LTD http://www.bris.cn/
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bris.niosocket;

import org.aeonbits.owner.Config;

/**
 * 服务系统参数</br>
 * 2016年2月2日</br>
 * @author xunaidong
 * @since 1.0.0
 */
@Config.Sources("classpath:application.properties")
public interface Configuration extends Config {

    // *********************system configuration*********************
    @Key("host")
    @DefaultValue("localhost")
    String host();

    @Key("port")
    @DefaultValue("8888")
    int port();

    @DefaultValue("true")
    boolean isMaster();

    @DefaultValue("true")
    boolean tcpNoDelay();

    @DefaultValue("true")
    boolean soKeepAlive();

    @Key("common.package")
    @DefaultValue("com.bris.niosocket")
    String getPackageName();


    // ***********************application configuration*****************

    @Key("env")
    @DefaultValue("uat")
    String env();

    @Key("servers.${env}.appId")
    @DefaultValue("25112")
    int appId();

}
